import { Component, OnInit, Output, EventEmitter } from '@angular/core';

@Component({
  selector: 'news',
  templateUrl: './news.component.html',
  styleUrls: ['./news.component.scss'],
})
export class NewsComponent implements OnInit {
  title = 'news title';
  public content = '<h2>h2标签</h2>';
  username: string = '章三';
  age: number = 12;
  list: Array<number> = [1, 2, 3, 4, 5, 6];
  public userlist: any[] = [
    {
      name: 'zhangsan',
      age: 12,
    },
    {
      name: 'lisi',
      age: 20,
    },
  ];

  newsList: any[] = ['new 1', 'new 2', 'new 3'];

  @Output() handleClick = new EventEmitter();
  click() {
    console.log('click');
  }
  constructor() {
    this.title = 'change title';
  }

  ngOnInit(): void {}
}
